ia.Indicator Class
Contains information about an indicator.
Constructor
ia.Indicator
-
geography -
theme -
data
Parameters:
-
geographyia.GeographyThe geography the indicator belongs to.
-
themeia.ThemeThe theme the indicator belongs to.
-
dataJSONThe json data describing the object.
Item Index
Methods
- getAssociate
- getAssociates
- getChildren
- getComparisonData
- getComparisonValue
- getComparisonValues
- getData
- getData
- getData
- getDataPrecision
- getDataTree
- getDataType
- getFormattedComparisonValue
- getFormattedComparisonValues
- getFormattedValue
- getFormattedValues
- getLowerLimits
- getProperties
- getProperty
- getUpperLimits
- getValue
- getValues
- parseData
Methods
getAssociate
-
associateName
Returns the associate that corresponds to the name.
Parameters:
-
associateNameStringThe associate name.
Returns:
getAssociates
()
ia.Associate[]
Returns the associates contained in the indicator.
Returns:
getChildren
()
Object
Returns an array of data objects that are children of this object.
Returns:
getComparisonData
()
Associative Array
Returns a hashtable of the indicator plus associate comparison data.
The returned data has the following structure:
["eh11"]{id:"eh11", name:"polwarth", value:2345, value_formatted:2345, associate1:25, associate1_formatted:25}
["eh12"]{id:"eh12", name:"morningside", value:4347, value_formatted:4347, associate1:45, associate1_formatted:45}
["eh13"]{id:"eh13", name:"merchiston", value:2496, value_formatted:2496, associate1:25, associate1_formatted:25}
Returns:
getComparisonValue
-
id
Returns the comparison value that corresponds to the feature id.
Parameters:
-
idStringThe feature id.
Returns:
getComparisonValues
()
Number | String
Returns the list of comparison values.
Returns:
getData
-
associateNames -
featureIds
Gets the indicators associate comparison data.
Parameters:
-
associateNamesStringAn optional list of associate ids.
-
featureIdsStringAn optional list of feature ids to get data for.
Returns:
getData
-
associateNames -
featureIds
Gets the indicators associate data.
Parameters:
-
associateNamesStringAn optional list of associate ids.
-
featureIdsStringAn optional list of feature ids to get data for.
Returns:
getData
-
featureIds
Returns a hashtable of the indicator plus associate data.
The returned data has the following structure:
["eh11"]{id:"eh11", name:"polwarth", value:2345, value_formatted:2345, associate1:25, associate1_formatted:25}
["eh12"]{id:"eh12", name:"morningside", value:4347, value_formatted:4347, associate1:45, associate1_formatted:45}
["eh13"]{id:"eh13", name:"merchiston", value:2496, value_formatted:2496, associate1:25, associate1_formatted:25}
Parameters:
-
featureIdsStringAn optional list of feature ids to get data for.
Returns:
getDataPrecision
-
dataField
Gets the data precision for the passed data field.
Parameters:
-
dataFieldStringThe data field as a String eg "value"; "associate1"; "name" etc.
Returns:
getDataTree
-
showDates -
reverseDates -
dataHash -
parentId
Returns an associative array of the form:
["i1"]{id:"i1"; label:"Home"; type:"branch"; children:["i2"; "i3"; "i4"]}
["i2"]{id:"i2"; label:"ia.Indicator 1"; type:"branch"; parent:"i1"; children:["i5"; "i6"; "i7"]}
["i5"]{id:"i5~2004"; label:"2004"; type:"leaf"; parent:"i2"}
Used by data explorers. Dates are returned as part of the tree.
Parameters:
-
showDatesBooleanShould the dates be displayed.
-
reverseDatesBooleanShould the dates be reversed.
-
dataHashAssociative ArrayAn associative array as described.
-
parentIdStringThe parent id.
getDataType
-
dataField
Gets the data type for the passed data field.
Parameters:
-
dataFieldStringThe data field as a String eg "value"; "associate1"; "name" etc.
Returns:
getFormattedComparisonValue
-
id
Returns the formatted comparison value that corresponds to the feature id.
Parameters:
-
idStringThe feature id.
Returns:
getFormattedComparisonValues
()
String
Returns the list of formatted comparison values.
Returns:
getFormattedValue
-
id
Returns the formatted value that corresponds to the feature id. Will also return a comparison value.
Parameters:
-
idStringThe feature id.
Returns:
getFormattedValues
()
String
Returns the list of formatted values.
Returns:
getProperties
()
Associative Array
Returns the custom properties. An associative array of the form: [propName] = propValue.
Returns:
getProperty
-
propName
Returns a value for a custom property.
Parameters:
-
propNameStringThe name of the property.
Returns:
getValue
-
id
Returns the value that corresponds to the feature id. Will also return a comparison value.
Parameters:
-
idStringThe feature id.
Returns:
getValues
()
Number | String
Returns the list of values.
Returns:
parseData
-
data
Parses the JSON data.
Parameters:
-
dataJSONThe json data describing the object.
Properties
customColumns
Object} Array of columns.
The custom columns that can be used in the data table.
data
JSON
The raw json data describing the object.
date
String
The indicator date.
fileName
String
The file name.
hasData
Boolean
Indicates if this object contains data.
Default: true
href
String
The href.
id
String
The id.
maxValue
Number
The maximum value.
minValue
Number
The minimum value.
name
String
The name.
parent
Object
The parent object.
precision
Number
The precision. Inherited from parent if undefined.
type
Number
The data type. Inherited from parent if undefined.
Default: "categoric"